package vip.xiaonuo.sys.fymodule.order.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;

/**
 * <p>
 * 支付日志
 * </p>
 *
 * @author wangy
 * @since 2025-06-18
 */
@Data
@TableName("sxo_pay_log")
@Schema(name = "SxoPayLog对象", description = "支付日志")
public class SxoPayLog implements Serializable {

    private static final long serialVersionUID = 1L;

    @Schema(description = "支付日志id")
    @TableId(value = "id", type = IdType.AUTO)
    private String id;

    @Schema(description = "支付日志订单号")
    @TableField("log_no")
    private String logNo;

    @Schema(description = "用户id")
    @TableField("user_id")
    private String userId;

    @Schema(description = "业务类型，字符串（如：订单 order、钱包充值 wallet、会员购买 member、等…）")
    @TableField("business_type")
    private String businessType;

    @Schema(description = "状态（0待支付, 1已支付, 2已关闭）正常30分钟内未支付将关闭")
    @TableField("status")
    private Integer status;

    @Schema(description = "支付方式标记")
    @TableField("payment")
    private String payment;

    @Schema(description = "支付方式名称")
    @TableField("payment_name")
    private String paymentName;

    @Schema(description = "订单名称")
    @TableField("subject")
    private String subject;

    @Schema(description = "业务订单金额")
    @TableField("total_price")
    private BigDecimal totalPrice;

    @Schema(description = "支付金额")
    @TableField("pay_price")
    private BigDecimal payPrice;

    @Schema(description = "支付平台交易号")
    @TableField("trade_no")
    private String tradeNo;

    @Schema(description = "支付平台用户帐号")
    @TableField("buyer_user")
    private String buyerUser;

    @Schema(description = "请求参数（数组则json字符串存储）")
    @TableField("request_params")
    private String requestParams;

    @Schema(description = "支付时间")
    @TableField("pay_time")
    private String payTime;

    @Schema(description = "关闭时间")
    @TableField("close_time")
    private String closeTime;

    @Schema(description = "添加时间")
    @TableField("add_time")
    private String addTime;
}
